﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;

namespace EventAndDelegate_
{
    class Program
    {
        //public static String a;
        //public static String chuoi;
        //static int a1 = 8;
        static void Main(string[] args)
        {
            Nhapphim obj = new Nhapphim();
            obj.Gophim += HienThi;
            obj.run();
        }
        public static void HienThi(Nhapphim sender, Char ch)
        {
            
            //a = ch.ToString();
            //chuoi += ch;
            Console.WriteLine("Phim vua nhap: " + ch);
            if (ch.ToString(CultureInfo.InvariantCulture).Equals(" "))
            {
                Console.WriteLine("Chuoi vua nhap:"+ sender.chuoi);// Chu ý khi in ra chuôi dấu +
                sender.chuoi = "";
            }
        }
    }
}
